<!DOCTYPE html>
<html>
<head>
    <title>注册</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="css/easyui/themes/gray/easyui.css">
	<link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
	<script type="text/javascript" src="js/jquery-1.6.1.js"></script>
	<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="js/easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
    function checkOnChange(arg){
        //alert(arg.value);
//      $.get('checkName.do', {name : arg.value}, function(data) {
//        var arr=eval('('+data+')')
//            alert(arr.name);
//        });
        $.getJSON('checkName.do', {name : arg.value}, function(data) {
            alert(data.check);
        });
    }


    </script>
</head>
<body>
<div style="width:430px;background:#E0ECFF;padding:10px;">
    <form id="form" action="reg.form" method="post">
        <table>
            <tr>
                <td>用户名:</td>
                <td><input name="name" type="text" onchange="checkOnChange(this)"></td>
                <td></td>
            </tr>
            <tr>
                <td>密   码:</td>
                <td><input name="password" type="password"></td>
                <td></td>
            </tr>
            <tr>
                <td>确认密码</td>
                 <td><input name="verifypass" type="password"></td>
                <td></td>
            </tr>
            <tr>
                <td>权  限:</td>
                <td>
                    <select name="grade">
                        <option value="1">管理员</option>
                        <option value="2">用户</option>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <td>Email:</td>
                <td>
                    <input name="email" type="text">
                </td>
                <td></td>
            </tr>
            <tr>
                <td>验证码:</td>
                <td><input name="code" type="text"></td>
                <td><img src="code.jpeg" alt=""> </td>
            </tr>
            <tr>
                <td><input type="button" value="注册"></td>
                <td><input type="submit" value="注册"></td>
                <td></td>
            </tr>
        </table>
    </form>
</div>
</body>
</html>